{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e58db8cc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入您的账号：roe\n",
      "请输入您你的密码：bug\n",
      "当前时间是: 2021-10-28 09:54 Thursday\n",
      "您想要查询星期几：4\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 9 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 8 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 7 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 6 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 5 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 4 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 3 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 2 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 1 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "尊敬的会员，欢迎登录系统使用\n",
      "您还有 0 次查看机会\n",
      "9:45-12:00 python 新综612\n",
      "14:30-15:55 广告文案写作 1教303\n",
      "18:45-20:55 毛概 9教201\n",
      "退出请输入e\n",
      "ee\n",
      "感谢您的使用\n",
      "您的查询机会已用完\n"
     ]
    }
   ],
   "source": [
    "user_data = [\"luoyu\", \"roe\"]\n",
    "password_data = \"bug\"\n",
    "user_data_vip = [\"roe\"]\n",
    "import datetime\n",
    "time = datetime.datetime.today().weekday()\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    # 用户输入数据\n",
    "    username = input(\"请输入您的账号：\")\n",
    "    password = input(\"请输入您你的密码：\")\n",
    "    # 1. 先判断账号\n",
    "    if username in user_data:\n",
    "        if username in user_data and username in user_data_vip:\n",
    "            if password_data == password:\n",
    "                import datetime\n",
    "                import time\n",
    "                import random\n",
    "\n",
    "                # right_this_week = random.randint(1,5)\n",
    "\n",
    "                right_now_time = time.strftime(\"%Y-%m-%d %H:%M %A\")\n",
    "                print(\"当前时间是:\", right_now_time)\n",
    "\n",
    "                right_this_week = input(\"您想要查询星期几：\")\n",
    "                right_this_week = int(right_this_week)\n",
    "                count = 10\n",
    "                while True:\n",
    "                    if count == 0:\n",
    "                        print(\"您的查询机会已用完\")\n",
    "                        break\n",
    "                    else:\n",
    "                        count -= 1\n",
    "\n",
    "                        print(\"尊敬的会员，欢迎登录系统使用\")\n",
    "                        print(\"您还有\", count, \"次查看机会\")\n",
    "                        if right_this_week == 1:\n",
    "                            print(\"10:35-12:00 大学英语 10教204\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 2:\n",
    "                            print(\"9:45-12:00 创业基础 1教205\");\n",
    "                            print(\"14;30-15:55 新媒体时代的新闻评论 3实206\");\n",
    "                            print(\"18:45-20:10 羽毛球 东体\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 3:\n",
    "                            print(\"8:00-9:30 毛概 9教207\");\n",
    "                            print(\"9:45-12:00 融合新闻学 新综612\");\n",
    "                            print(\"18:45-20:10 大学英语 10教204\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 4:\n",
    "                            print(\"9:45-12:00 python 新综612\");\n",
    "                            print(\"14:30-15:55 广告文案写作 1教303\");\n",
    "                            print(\"18:45-20:55 毛概 9教201\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 5:\n",
    "                            print(\"10:45-12:00 ai 新综612\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit= input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        else:\n",
    "                            print(\"周末摆烂\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit= input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "            else:\n",
    "                if count == 0:\n",
    "                    print(\"你都输入3次了还错,5分钟再来吧笨蛋\")\n",
    "                    break\n",
    "                else:\n",
    "                    print(\"您输入的账号或密码不正确，请重新输入,你还有“,count,”次机会\")\n",
    "        else:\n",
    "            if password_data == password:\n",
    "                import datetime\n",
    "                import time\n",
    "                import random\n",
    "\n",
    "                # right_this_week = random.randint(1,5)\n",
    "\n",
    "                right_now_time = time.strftime(\"%Y-%m-%d %H:%M %A\")\n",
    "                print(\"当前时间是:\", right_now_time)\n",
    "\n",
    "                right_this_week = input(\"您想要查询星期几：\")\n",
    "                right_this_week = int(right_this_week)\n",
    "                count = 5\n",
    "                while True:\n",
    "                    if count == 0:\n",
    "                        print(\"您的查询机会已用完\")\n",
    "                        break\n",
    "                    else:\n",
    "                        count -= 1\n",
    "\n",
    "                        print(\"用户你好，欢迎登录系统\")\n",
    "                        print(\"您还有\", count, \"次查看机会\")\n",
    "                        if right_this_week == 1:\n",
    "                            print(\"10:35-12:00 大学英语 10教204\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 2:\n",
    "                            print(\"9:45-12:00 创业基础 1教205\");\n",
    "                            print(\"14;30-15:55 新媒体时代的新闻评论 3实206\");\n",
    "                            print(\"18:45-20:10 羽毛球 东体\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit= input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 3:\n",
    "                            print(\"8:00-9:30 毛概 9教207\");\n",
    "                            print(\"9:45-12:00 融合新闻学 新综612\");\n",
    "                            print(\"18:45-20:10 大学英语 10教204\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit= input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 4:\n",
    "                            print(\"9:45-12:00 python 新综612\");\n",
    "                            print(\"14:30-15:55 广告文案写作 1教303\");\n",
    "                            print(\"18:45-20:55 毛概 9教201\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        elif right_this_week == 5:\n",
    "                            print(\"10:45-12:00 ai 新综612\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit = input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "                        else:\n",
    "                            print(\"周末摆烂\")\n",
    "                            print(\"退出请输入e\")\n",
    "                            exit= input(\"e\")\n",
    "                            if exit == \"e\":\n",
    "                                print(\"感谢您的使用\")\n",
    "            else:\n",
    "                if count == 0:\n",
    "                    print(\"你都输入3次了还错,5分钟再来吧笨蛋\")\n",
    "                    break\n",
    "                else:\n",
    "                    print(\"您输入的账号或密码不正确，请重新输入,你还有“,count,”次机会\")\n",
    "    else:\n",
    "        print(\"您输入的账号密码错误\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "987f3437",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
